﻿var committeeUtil = {
    getMyCommittee: function (staffId, currentPage, callback) {
        $.ajax({
            type: "GET",
            url: committeeUrl + "GetMyCommittees?staffID=" + staffId + "&pageSize=5&currentPage=" + currentPage,
            success: function (result) {
                var resultJSON = $.parseJSON(result.d);
                callback(resultJSON);
            },
            failure: function (msg) {
                alert(msg);
            }
        });
    },

    getOtherCommittee: function (staffId, currentPage, callback) {
        $.ajax({
            type: "GET",
            url: committeeUrl + "GetOtherCommittees?staffID=" + staffId + "&pageSize=5&currentPage=" + currentPage,
            success: function (result) {
                var resultJSON = $.parseJSON(result.d);
                callback(resultJSON);
            },
            failure: function (msg) {
                alert(msg);
            }
        });
    }
}

